﻿using System;


namespace SwitchBetweenStringIntegerDouble
{
    class SwitchBetweenStringIntegerDouble
    {
        static void Main(string[] args)
        {
            //Write a program that, depending on the user's choice inputs int, double or string variable. If the variable is integer or double, increases it with 1.
            //If the variable is string, appends "*" at its end. The program must show the value of that variable as a console output. Use switch statement.

            int choice = 0;
            Console.WriteLine(@"Enter: 1 for int
                                       2 for double
                                       3 for String");
            Console.WriteLine("Input your choice:");
            bool isCorrectChoice = int.TryParse(Console.ReadLine(), out choice);

            if (choice >= 1 && choice <= 3)
            {
                switch (choice)
                {
                    case 1:
                        {
                            Console.WriteLine("Input Int number:");
                            int number = int.Parse(Console.ReadLine());
                            Console.WriteLine("Output +1:\n" + (number + 1) + "= Int"); 
                        } break;
                    case 2:
                        {
                            Console.WriteLine("Input Double number:");
                            double number = double.Parse(Console.ReadLine());
                            Console.WriteLine("Output +1:\n" + (number + 1.0) + "= Double"); 
                        } break;
                    case 3:
                        {
                            Console.WriteLine("Input String:");
                            String word = null;
                            word = Console.ReadLine();
                            Console.WriteLine("Output + *:\n"+word+"*"); 
                        }
                        break;
                    default: Console.WriteLine("Nothing"); break;
                }
            }
            else
            {
                Console.WriteLine("Wrong input! Must be : choice >= 0 && choice <= 3");
            }
        }
    }
}
